<?php



namespace App\Http\Requests\Company;

use Carbon\Carbon;
use Illuminate\Support\Facades\Auth;

class PrivilegeRequest extends BaseRequest
{
    /**
     * Determine if the user is authorized to make this request.
     *
     * @return bool
     */
    public function authorize()
    {
        return true;
    }

    /**
     * Get the validation rules that apply to the request.
     *
     * @return array
     */
    public function rules()
    {
        return [
            'title' => 'required|max:120',

        ];
    }

    public function messages()
    {
        return [
            'title.required' => __('请输入仅限的标题'),

        ];
    }

    public function filldata()
    {
        $user= Auth::user();
        return [
            'company_id'=>(int)$user['login_company_id'],
            'title' =>(string) $this->input('title', ''),
            'icon' => (string)$this->input('icon', 'home'),



        ];
    }
}
